package ai_auto

import (
	"gddgame.cc/galaxy/common/dsl/game"
)

const providerName = "ai_auto"

func init() {
	_ = game.RegisterGlobalModule(game.ModuleProvider{
		Name:    providerName,
		Depends: []string{"group", "ai"},

		OnInit: func(env *game.Environment) error {
			var err error
			if _, err = env.RegisterModel(AiCommandName, &AiCommand{}); err != nil {
				return err
			}
			if _, err = env.RegisterModel(AiConditionTemplateName, &AiConditionTemplate{}); err != nil {
				return err
			}
			if _, err = env.RegisterModel(AiGroupConfigName, &AiGroupConfig{}); err != nil {
				return err
			}
			return nil
		},
	})
}
